package com.okami.array;

import com.rabbitmq.client.UnblockedCallback;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.event.TransactionalEventListener;

import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.function.Supplier;
import java.util.function.UnaryOperator;
import java.util.stream.Stream;

/**
 * @author: TanJingyu
 * @create: 2021-03-22 22:03
 **/
class Test {

    public Test(){}

    public Test(String name) {

    }

    public String getName() {
        return "";
    }

    public void setName(UnaryOperator<String> operator) {
        operator.apply("");
    }

    public static void main(String[] args) {
        Test test = new Test();
        A a = (String name, Integer age) -> {
            System.out.println(test);
        };

//        Comparator.comparing(cd -> "").thenComparingLong()


        Test[] objects = (Test[]) Arrays.asList(new Test()).toArray();
        Arrays.<Test>sort(objects, Comparator.comparing(o -> o.getName()));


    }

    @Override
    public Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    Boolean sort(Comparable[] comparables) {
        return true;
    }

    interface A {
        void getName(String name, Integer age);
    }

    interface B {
        Object getName(String n);
    }
}
